/**
 * Created by Administrator on 2018/10/21.
 */
var express = require('express');
var fs = require('fs');
var app = express();


var data=JSON.parse(fs.readFileSync('./sell.json'));

app.get('/', function(req, res){
    res.end( " hello! ");
});

app.get('/goods', function(req, res){
    res.json({errno: 0, data: data.goods});
});
app.get('/seller', function(req, res){
    res.json({errno: 0, data: data.seller});
});
app.get('/ratings', function(req, res){
    res.json({errno: 0, data: data.ratings});
});

app.listen(3000);
console.log('listen 3000');

